Repository navigation
Conversation
…ntity flow) - LdapClient: JNDI bind + search, RFC4515 filter escaping, injectable Connect for tests - LdapConfig + DeveloperAuthType.LDAP + PortalSettingConfig.ldap - LdapService/LdapServiceImpl: resolve DN (pattern or admin-search), bind verify, find-or-create developer via existing external-identity flow, issue token - DeveloperController POST /developers/ldap/login - LdapServiceImplTest: 5 cases green (existing/new developer, bind fail, unconfigured, search mode)
|
00055624 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Author
更新:前端 LDAP 登录 Tab 已追加(commit 938151c)
剩余非阻塞:①portal 后台填 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
T-34:为 himarket 开发者门户接入企业 LDAP(AD)登录,让内网员工用域账号直接登录,省去单独注册。
设计要点
DeveloperExternalIdentity(provider+subject 唯一约束)、getExternalDeveloper/createExternalDeveloper一套流程直接复用,零新建表。javax.naming.directory走 bind + search,零外部依赖(不引 Spring LDAP)。userDnPattern直拼 或userSearchBase+userSearchFilter由管理员 DN 检索(RFC4515 转义用户名防注入)。LdapConfig.enabled()未配置时LdapService直接返回未配置,不影响原有账密 / OAuth2 登录。改动范围(侵入性评估)
LdapClient、LdapConfig、LdapService/LdapServiceImpl、单测LdapServiceImplTest,及DeveloperAuthType.LDAP枚举值。DeveloperController(+LDAP 登录端点,@PublicAccess)、PortalSettingConfig(+ldap 字段)、DeveloperAuthType(+LDAP)。测试
LdapServiceImplTest:5 用例(已有开发者 / 新建开发者 / 绑定失败 / 未配置 / 检索模式),BUILD SUCCESS。Connect函数式接口注入 mockDirContext,不依赖真实 LDAP 服务器。待上游 review 后补充(非阻塞)
LdapConfig(对接公司 AD10.2.7.31:389)。LdapService.isConfigured()显隐)。安全